package cn.sunxyz.sample.aop;

import cn.sunxyz.aop.annotation.Aop;
import cn.sunxyz.aop.aspect.AbstractInvocationHandler;
import cn.sunxyz.aop.aspect.Invocation;

/**
 * Created by yangrd on 2017/5/26.
 */
@Aop(pkg = "cn.sunxyz.sample.service", cls = "UserService", sort = -1)
public class InvocationHandler1 extends AbstractInvocationHandler {
    @Override
    public Object handlerInvocation(Invocation invocation) throws Throwable {
        System.out.println("InvocationHandler1 => before " + invocation.method);
        Object obj = createProxyObj(invocation);
        System.out.println("InvocationHandler1 => after " + invocation.method);
        return obj;
    }
}
